“I’d like to use your Obsidian templates, but they look so complicated?” Not anymore! A comprehensive guide on how to set up periodic notes to keep track of your habits, goals, reflections and more.
As mentioned in my previous post, I use my Obsidian vault as my second brain, where I keep track of my learnings, ideas and projects.
Over time, I realized I wanted to keep track of much more than that. I needed a system where I could fully track habits, goals, health metrics, to-do lists, and more. Through a lot of experimentation, I discovered that the best system for me involved automated periodic notes in Obsidian. In other words, using smart daily, weekly, monthly, and yearly note templates that are easy to populate and automatically interconnected. The key for me was having a low-friction space to capture everything.
My daily note template in Obsidian
The templates I’m currently using—and sharing in this post—were created in November 2023. Since then, I’ve generated over 300 daily and 50 weekly notes using this format. I’m sharing these templates and setup guide because, when I first started with Obsidian, I was searching for inspiration too. Although the templates may seem a bit overwhelming at first, most of the content is automatically generated, making it easy to create new notes.
My weekly note template in Obsidian
By the end of this post, you’ll have a system that captures everything you want to track—and more. You’ll also gain a solid understanding of Templater, Dataview, and how to customize the templates to suit your needs. If you’d rather skip the detailed walkthrough, you can access the entire collection of templates here.
To make this system work, you’ll need to install a few Obsidian plugins through the Community plugins tab:
Templater (required): Defines a templating language that lets you insert variables, functions and JavaScript code into your notes. I’ll explain the Templater/JS code used in each part of the templates below.
Dataview (required): Provides a JavaScript API and query language for filtering, sorting, and extracting data from Markdown pages. This lets you query your Obsidian vault and fetch or filter information from other notes.
Periodic Notes and Calendar (recommended): Enable the creation of daily, weekly, and other periodic notes by clicking on a day or week in the calendar UI.
DB Folder (recommended): Allows for Notion-like databases based on folders, making it easier to edit tracked items in daily notes.
Charts (optional): Enables easy creation of charts from your notes.
Heatmap Calendar (optional): Allows for the creation of heatmap calendars from your notes.
Todoist (optional): Enables bidirectional syncing of Todoist tasks with your Obsidian notes.
Copy the templates from here and put them into your Obsidian vault in a folder called Templates.
Go to Templater settings and:
Enable Trigger Templater on new file creation.
Select Add new folder template.
Make filename_template.md1 the default template for the root directory as below.
Go to Periodic Notes settings and update the paths in each box to use the new template files.
This will let you create notes by clicking on a day or week in the Calendar (provided by Calendar plugin) or by running Periodic Notes’ commands from the Command Palette i.e. CMD + P on Mac, CTRL + P on Windows or simply swiping down on mobile.
The templates use the default filename formats. If you are using customized filename formats, modify the templates accordingly (refer to the Moment.js documentation for more information).
Periodic Note
Filename format
Example
Daily
YYYY-MM-DD
2024-09-10
Weekly
gggg-[W]ww
2024-W37
Monthly
YYYY-MM
2024-09
Quarterly
YYYY-[Q]Q
2024-Q3
Yearly
YYYY
2024
Go to Dataview settings and switch on Enable JavaScript queries and Enable inline JavaScript queries. This lets you write queries using JavaScript within the Dataview plugin (and thus access more complex logic and operations). Don’t worry if you don’t know JavaScript, I’ll explain the code snippets below and you can modify them to your needs.
Whenever a new file is created in your Obsidian Vault, the filename_template.md template is triggered. It contains a Templater snippet that is used to check if the title of the current note matches one of the filename formats of your periodic notes. If it does, the template for that periodic note is inserted. The highlighted lines2 should be updated if you are using customized filename formats.
This automatically moves your periodic note to the correct location as it is created i.e. move daily notes to Journal/Daily/, weekly notes to Journal/Weekly/ etc. This setup allows for seamless navigation through days, weeks, months, and years, whether you’re working with existing notes or creating new ones on the fly.
Let’s go through each part of the daily template in detail and explore what’s happening behind the scenes. This will allow you to customise the template to your needs.
At the beginning of every daily file, you’ll find a list of attributes stored as YAML front matter. These attributes are used to track habits, health metrics, and anything else you want to monitor each day, feeding this data into your other notes. The highlighted lines can be customized (or removed) to suit your needs!
Templater runs automatically on new file creation (thanks to Step 2 above), so lines 2 and 3 will be converted to the correct week and weekday for each note. As you go through your day, you’ll fill in the values starting from line 6 and below.
Let’s go through the Templater code in lines 2 and 3 to start getting a feel for how it works:
This outputs the full weekday name based on the current note’s title, e.g., “Wednesday”.
The function tp.date.now(format, offset, referenceDate, referenceFormat) takes four arguments:
format (required): Date format string. We use "dddd" in our template to get the full weekday name. Some other common formats are:
Format
Example
Description
YYYY-MM-DD
2024-09-12
Year-Month-Day
MM/DD/YYYY
09/12/2024
Month/Day/Year
DD-MM-YYYY
12-09-2024
Day-Month-Year
MMMM D, YYYY
September 12, 2024
Month Day, Year
offset (optional): Days to add/subtract (e.g., 0, 1, -1).
referenceDate (optional): Date string to use as reference (e.g., "2024-09-18"). In this case, we use tp.file.title to get the note’s title.
referenceFormat (optional): Format of the reference date. Update this if you use a custom filename format for your daily notes.
Here’s an example of what a typical daily note might look like by the end of the day:
Journal/Daily/2024-09-11
1
2
3
4
5
6
7
8
9
10
11
---
week: 2024-W37
weekday: Wednesday
tag:
- Daily
aliases: The day we went to the UCT comedy night
location: London
mood: 4
sleep: 80
weight: 77
...
You can populate your chosen values for these attributes directly within each daily note (if you have the attributes view enabled in your global Obsidian settings), or you can edit them from a table view using DB Folder. Check out this video to get started with DB Folder.
DB Folder table view of daily note attributes
Any edits you make to the DB Folder database will automatically update the attributes for the relevant days. The daily notes are essentially where the database is stored.
In Obsidian, when using the [[ ]] syntax for linking, the text before the pipe (|) is the target of the link (i.e., the actual file or note that the link points to). The text after the pipe (|) is the display text (i.e., what you will see in the note instead of the file name).
Create previous, current, and next day navigation links:
The next section of the template is a Dataview query which visualizes the attributes you are tracking. I’ve found this to be a valuable way to get a quick overview of my day and stay accountable for the habits I’m trying to build.
Once again, the highlighted lines can be customized with any attributes, symbols or emojis.
Templates/Daily Template
34
35
36
37
38
39
40
41
42
43
44
45
```dataview
table without id
mood + " #_/habits" AS "🌄",
prayer AS "🙏",
choice(meditation,"✅","❌") AS "🧘♂️",
choice(exercise,"✅","❌") AS "🏃♂️",
choice(study,"✅","❌") AS "📚",
choice(stretch,"✅","❌") AS "🤸",
choice(nocomplaint,"✅","❌") AS "🤷♂️"
from "Journal/Daily"
where file.name = "<% moment(tp.file.title).format("YYYY-MM-DD")%>"
```
The choice() function takes three arguments, and returns the second argument if the first is true. Otherwise it returns the third argument. In this case, it is used to return a tick if the attribute is true, and a cross if it is false. Lines 43-44 filters the data from the Journal/Daily folder to only show the current day.
Also worth pointing out is the " #_/habits " in Line 37. This activates a custom CSS style that reduces the padding between columns—a necessary tweak to make the table fit on phone screens. If you’d like to do the same, add the following CSS to your vault (Appearance > CSS Snippets)
The next section of the template is a DataviewJS snippet that extracts, randomizes, and displays a random gratitude and learning from your previous daily notes. I’ve found this helps me reflect more and encourages me to write gratitudes and learnings regularly, knowing they’ll resurface again in the future.
```dataviewjs
// List of gratitudes
let gratitudes = [];
// Extract gratitudes from pages that have them
dv.pages()
.where(page => page.gratitude)
.forEach(page => {
dv.array(page.gratitude)
.forEach(gratitude => {
gratitudes.push({
message: gratitude,
page: page
});
})});
let learnings = [];
// Extract learnings from pages that have them
dv.pages()
.where(page => page.learning)
.forEach(page => {
dv.array(page.learning)
.forEach(learning => {
learnings.push({
message: learning,
page: page
});
})});
let gratitudegreeting = gratitudes[Math.floor(Math.random()*gratitudes.length)]
let learninggreeting = learnings[Math.floor(Math.random()*learnings.length)]
dv.paragraph("*Practice gratitude:* " + gratitudegreeting.message +
" (" + gratitudegreeting.page.file.link + ")" + "<br>" +
"*A random learning:* " + learninggreeting.message + " (" + learninggreeting.page.file.link + ")");
```
Here’s a step-by-step breakdown of what the code does for the random gratitude (and similar for random learning):
Initialize Array and Extract Gratitudes:
dv.pages() collects all pages (notes) in your vault and then filters pages that have a gratitude field using .where(page => page.gratitude). These are any pieces of text within your notes with the format: “Gratitude:: [your gratitude here]”
For each page with a gratitude field, it pushes each gratitude item into the gratitudes array along with a reference to the page.
Random Selection:
A random gratitude message is selected from the gratitudes array using Math.floor(Math.random()*gratitudes.length).
Display Output:
The code generates a paragraph (dv.paragraph) that displays the randomly selected gratitude, along with a link back to the source page where the gratitude was found.
The next section fetches a random daily quote from the web and displays it in the daily note using Templater. Keep in mind that the API used in the background (quotable) can occasionally go down, which may result in an “Error generating daily quote” message instead of the quote.
Below that, I’ve set it up to fetch the goals for the current week from the weekly note and display them in the daily note.
![[...]]: Obsidian syntax for embedding a link to another note within your current note. The exclamation mark (!) at the beginning means that the link will be displayed as an embedded preview rather than just a link.
Journal/Weekly/<%moment(tp.file.title).format("gggg-[W]WW")%>#Goals for this week: This dynamically generates the path to the target file by getting the date from the current daily note title and formatting it to match the filename of the weekly note.
#Goals for this week: This part specifies the heading within the target file that contains the goals.
Any changes made to the “Goals for this week” section in your weekly note will automatically update in all daily notes linked to that week. You can also mark a goal as complete directly from the daily notes.
The next section allows you to fetch your Todoist tasks for the day and display them in your daily note. You can add new tasks to your Todoist account from within Obsidian by clicking the + button. This requires the Todoist plugin to be installed and configured with your Todoist account.
The highlighted line can be modified to filter tasks by project, due date etc. My filter is set to show all tasks that are not in the “Work” project and that are due before tomorrow.
Templates/Daily Template
1
2
3
4
5
6
7
8
9
> [!todo]- Tasks of the day
>```todoist
>name: ''
>filter: "(!#Work) & due before: tomorrow"
>sorting:
>- date
>- priority
>group: true
>```
The > [!todo] statement is optional but enables the Obsidian callout formatting i.e. the box around the tasks. The dash after > [!todo] tells Obsidian to default to having the block collapsed when the note is opened.
These sections (and similar ones below) are where I document my learnings, highlights, and other reflections for each day. I’ve found that writing these down regularly encourages more thoughtful reflection. If you have multiple learnings or highlights in a day, add them in the same format, e.g., “Highlight:: [your highlight here]”. The double colon is recognised by Dataview as a field and ensures that your entries filter through to other notes.
The next section of the daily note template displays a random highlight from my collection of Kindle and podcast notes. I added this feature because I found it challenging to keep track of all the highlights I made from podcasts and Kindle notes, and I thought it would be helpful to fetch a random one each day to bring past highlights back to mind.
This requires your underlying notes to be formatted with the “Kindle:: [your highlight here]” or “Podcast:: [your learning here]” fields.
One of my Kindle notes (Kindle/Paul Graham Essays)
This is easy to achieve automatically for all your kindle notes by using the Obsidian Kindle Plugin to sync your kindle notes to Obsidian, along with a template like this:
The final section of the daily note template displays 3 random notes from your vault. I’ve found this useful for recalling concepts or ideas I’ve noted down in the past. Once again, we rely on DataviewJS to fetch the random notes. The highlighted lines are used to exclude certain folders (like Journal, Templates, Assets etc), but you can add more exclusions as needed.
The “Files created on this day” section lets you see all the notes you created on this day. Not the most useful, but it’s a nice feature to have when going through old daily notes.
Templates/Daily Template
1
2
3
4
> [!note]- Files created on this day
>```dataview
>LIST WHERE file.cday = date(this.file.name)
>```
As you move from the daily notes to the weekly notes, you’ll notice that less manual input is required, since most of the data is already captured in the daily notes. While the daily note template is where I track my day-to-day activities and habits, the weekly note template is primarily used to monitor my goals for the current week. Any changes made to the “Goals for the week” section will automatically reflect in all daily notes linked to that week. I also link to my monthly goals from the monthly note template to track progress over a longer period.
Similar to the daily template, I have a Dataview table visualization that displays all the habits I’m tracking in the daily notes, allowing me to quickly assess my progress for the week. I found that I stuck to my habits more consistently when I knew big red crosses would be staring at me every time I opened my weekly note.
Dataview visualisation of daily note attributes within the weekly note template
As before, the highlighted lines can be customized with any symbols or emojis you prefer.
Templates/Weekly Template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
```dataview
table without id
file.link AS "Date",
mood + " #_/habits" AS "🌄",
sleep AS "🛌",
prayer AS "🙏",
choice(meditation,"✅","❌") AS "🧘♂️",
choice(exercise,"✅","❌") AS "🏃♂️",
choice(study,"✅","❌") AS "📚",
choice(stretch,"✅","❌") AS "🤸",
choice(nocomplaint,"✅","❌") AS "🤷♂️"
from "Journal/Daily"
where week = "<% moment(tp.file.title).format("gggg-[W]ww")%>"
sort file.name ASC
```
Similar to the weekly note template, the monthly note template is where I track my goals for the current month. These goals are also the only manual input required in this template each month. Any changes made to the “Goals for the month” section will automatically reflect in all weekly notes linked to that month.
Below that, I have a Dataview query that lists memorable days from the current month, which helps in quickly recalling significant events or achievements from the month.
The list is generated by searching for pages in the vault that have an alias property in the metadata, and then checking if the month field matches the current month.
Templates/Monthly Template
1
2
3
4
5
6
7
8
```dataview
TABLE aliases
FROM "Journal"
WHERE aliases != null
AND file.day.year = number(substring(this.file.name, 0, 4))
AND dateformat(date(file.name), "yyyy-MM") = replace(this.file.name, "M", "")
SORT file.day
```
Below this, I have Dataview queries that list all the daily learnings and highlights from the current month. It’s a great way to reflect on what you’ve learned and revisit the highlights you’ve noted throughout the month.
Templates/Monthly Template
1
2
3
4
5
6
7
8
```dataview
TABLE WITHOUT ID file.day.weekyear AS Week, learning
FROM "Journal/Daily"
WHERE learning != null
AND file.day.year = number(substring(this.file.name, 0, 4))
AND dateformat(date(file.name), "yyyy-MM") = replace(this.file.name, "M", "")
SORT file.day
```
Finally, the yearly note template offers an overview of the attributes I track in my daily notes. It’s a great way to monitor long-term progress and identify trends or patterns. This note is fully automated and requires no manual input once the template is set up.
We use DataviewJS to fetch data from the daily notes, and the Charts or Heatmap plugins to visualize it. You’ll just need to adjust the highlighted lines to match the attributes you’re tracking.
I hope you found this guide helpful! I didn’t anticipate the walkthrough to be this detailed, but I hope it clarified the various components of my daily, weekly, monthly, and yearly note templates. I think of my periodic notes as a second homepage (my actual dashboard might gets its own blog post!). They’ve been invaluable in helping me stay on top of my habits, goals, and more.
If you have any questions or feedback, please feel free to leave a comment below.
Getting the code block formatting right for this post required a deep dive into TailwindCSS, Javascript and the inner workings of Hugo, but it will make for a good future blog post. ↩︎